home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1906 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  768 b 

  1. Path: zynet.net!usenet
  2. From: damage@nashuauk.zynet.co.uk (Damage)
  3. Newsgroups: comp.lang.c++
  4. Subject: cin and floats
  5. Date: Sun, 14 Jan 1996 22:48:02 GMT
  6. Organization: Zynet Ltd
  7. Message-ID: <4d9d0g$5s0@sol.zynet.net>
  8. NNTP-Posting-Host: nashuauk.zynet.co.uk
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. HELP!  I can't seem to use "cin" to input into floating point numbers.
  12. Whenever I enter a decimal number I just get "Floating Point
  13. Overflow".  Integers are fine, it's also fine if I enter whole number
  14. into the float variable (and yes I'm positive that I've declared the
  15. variable correctly).
  16.  
  17. I am using Turbo C++ 4.5 for Windows under Win '95.
  18.  
  19. eg:
  20.     float x;
  21.  
  22.     cout << "Enter Real Number: ";
  23.     cin >> x;
  24.  
  25. Any help would be most appreciated.
  26.  
  27. Cheers.  Shane.
  28. ...~daMage~...
  29.  
  30.